<!DOCTYPE html>
<html>

<body>

  <script src="iframeComet.js"></script>

  <button onclick="go()">IframeComet.open("comet");</button>


  <div id="showElem"></div>

  <script>
    IframeComet.onMessage = IframeComet.onError = show;

    function show(msg) {
      showElem.innerHTML = msg;
    }

    function go() {
      IframeComet.open("comet");
    }
  </script>


</body>

</html>